package top.jiangqiang.qyblog.core.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import top.jiangqiang.qyblog.core.base.entity.BaseEntityVo;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 友情链接
 * </p>
 *
 * @author JiangQiang
 * @since 2023-03-24
 */
@Data
@Accessors(chain = true)
@Schema(name = "BlogLink", description = "$!{table.comment}")
public class NavVo extends BaseEntityVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "导航栏名称")
    @NotBlank(message = "导航栏名称不能为空")
    private String name;

    @Schema(description = "导航路径，也可以是完整的URL链接")
    private String path;

    @Schema(description = "简介")
    private String introduction;

    @Schema(description = "菜单元数据，设置一些数据给前端页面使用")
    private String metadata;

    @Schema(description = "是否隐藏，默认显示")
    private Boolean hide;

    @Schema(description = "打开方式 1新开窗口/0当前窗口")
    private Integer openStyle;

    @Schema(description = "父菜单ID，顶级菜单为0")
    private Long parentId;

    @Schema(description = "菜单排序")
    private Integer sort = 0;

    @Schema(description = "当前菜单下的子菜单数量")
    private List<NavVo> children = new ArrayList<>();
}
